

from app.common.exceptions import GenericException
from app.common.enums.resp_enum import ErrTypes

from app.config import ConfigObj
from app import conf

chn_config_dt = conf.PAY_CHANNEL_CONFIG
#ServiceEnum = conf.ServiceEnum

def get_inter_bank_flag(channel_code: str, bank_code: str):
    #chn_config_dt = conf.PAY_CHANNEL_CONFIG
    cf = chn_config_dt.get(channel_code)
    if cf:
        if cf['bank_code'] == bank_code:
            return '0'
        else:
            return '1'
    else:
        raise GenericException(ErrTypes.chn_invalid_bank_code)


